
local MainScene = class("MainScene", cc.load("mvc").ViewBase)

function MainScene:onCreate()
    display.loadSpriteFrames("fruit.plist", "fruit.png")

    display.newSprite("mainBG.png")
        :addTo(self)
        :move(display.cx, display.cy)

    ccui.Button:create("startBtn_N.png", "startBtn_S.png", "", ccui.TextureResType.plistType)
        :addTo(self)
        :move(display.cx, display.cy - 80)
        :addClickEventListener(function(btn)
                AudioEngine.playEffect("music/btnStart.mp3")
                local playScene = import("app.views.PlayScene"):new()
                display.runScene(playScene, "turnOffTiles", 0.5)
            end)
end

return MainScene
